import matplotlib.pyplot as plt
import numpy as np
from mpl_toolkits.mplot3d import Axes3D
"""
x1 = np.linspace(-1, 1, 50)
y1 = x1 * x1
plt.plot(x1, y1)
plt.xlim(-1, 2)
plt.ylim(-2, 3)
"""
fig = plt.figure()
ax = Axes3D(fig)

X = np.arange(-4, 4, 0.25)
Y = np.arange(-4, 4, 0.25)
X, Y = np.meshgrid(X, Y)
R = np.sqrt(X ** 2 + Y ** 2)
Z = np.sin(R)

ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap=plt.get_cmap('rainbow'))
ax.contour(X, Y, Z, zdir='z', offset=-1)


plt.show()
